package multiThread;

// create multi thread in java
// two ways:	1. extends Thread class
//				2. implements Runnable interface

// CREATE MULTI THREAD IN JAVA : EXTENDS THREAD CLASS
class Aq extends Thread {
	public void run() {
		for (int i = 0; i < 1020; i++)
			System.out.println("I = " + i);
	}
}

class Bq extends Thread {
	public void run() {
		for (int i = 0; i < 1020; i++)
			System.out.println("J = " + i);
	}
}

public class MyThread2 {
	public static void main(String args[]) {
		Aq obj1 = new Aq();
		Bq obj2 = new Bq();
		obj1.start();
		obj2.start();
	}
}